<!DOCTYPE html>
<html lang="en">
<head>
	<{include file="header.html"}>
	<title>做题历史</title>
</head>
<body>
<div class="wrap">
	<!--star left-->
	<div class="column">
		<{include file="user/left_menu.html"}>
	</div>
	<div id="ContMianBox">
		<!--star子栏目-->
		<div class="sub-colum">
				<div class="tit">教务管理</div>
				<ul>
					<li><a href="/user/classes">我的班级</a></li>
					<li><a href="/user/class_time">我的课程表</a></li>
					<li <{if $type == 3}>class="curr"<{/if}>><a href="/user/classes/volume_list/3">我的作业</a></li>
					<li <{if $type == 4}>class="curr"<{/if}>><a href="/user/classes/volume_list/4">我的考试</a></li>
				</ul>
			</div>
		<!--end子栏目-->
		<!--end left-->
		<div class="container narrow">
			<!--star conter-->
			<div class="cetContent">
				<div class="tit p-lr20">
					<span class="curr">做题历史</span>
				</div>
				<!--star内容区域-->
				<div class="mainScroll">
					<div class="mainContainer line-all">
						<!--star tabMainCont-->
						<blockquote class="layui-elem-quote" style="font-size: 20px;">
							<p>
							<{if $test_volume_data.status == 0 }>
							<span style="color:red">本次考试尚未交卷，无法计算考试结果</span>
							<{else}>
							本次答题从 <span style="color:red"><{$test_volume_data.begin_time|date_format:'%Y-%m-%d %H:%M:%S'}></span> 至 <span style="color:red"><{$test_volume_data.end_time|date_format:'%Y-%m-%d %H:%M:%S'}></span>、 耗时共：<span style="color:red"><{($test_volume_data.end_time - $test_volume_data.begin_time)|changeTimeType}></span>、得分：<span style="color:red"><{$test_volume_data.fraction}></span>分、正确率：<span style="color:red"><{$test_volume_data.right_percentage}>%</span>
							<{/if}>
							</p>
							
							<{foreach from=$topic_type_analys key=key item=item1}>
								<p style="padding: 10px 0;">
								<{$item1.name}>(共<{$topic_list[$key]|count|default:0}>题)：答对：<{$item1.right_num}>题，答错：<{$item1.wrong_num}>题，得分：<{$item1.fraction}>分
								</p>
							<{/foreach}>
						</blockquote>
						<form class="form-horizontal layui-form layui-form-pane" method="post" action="/classes/save_home_work">
							<{foreach from=$test_volume_data item=item key=key}>
							<input type="hidden" name="<{$key}>" value="<{$item}>" >
							<{/foreach}>
							<br/><br/>
							<{foreach from=$topic_list item=topic key=tkey}>
								<blockquote class="layui-elem-quote" style="font-size: 20px;">
								<{if $tkey == 1}>单选题<{/if}>
								<{if $tkey == 2}>多选题<{/if}>
								<{if $tkey == 3}>判断题<{/if}>
								<{if $tkey == 4}>计算分析题<{/if}>
								<{if $tkey == 7}>不定向选择题<{/if}>
								<{if $tkey == 8}>名词解释<{/if}>
								<{if $tkey == 9}>简答题<{/if}>
								 共<{$topic|count}>题
								</blockquote>
								
								<{foreach from=$topic item=topic_info name=foo}>
								<blockquote class="layui-elem-quote layui-quote-nm">
									<h1 style="font-size: 16px;font-weight: bold; "><{$smarty.foreach.foo.iteration}>.<{$topic_info.subject_text}></h1>
									<hr>
									<{assign var="right_topics" value=""}>
									<{if $tkey != 4}>
									<{foreach from=$topic_info.result item=result key=key}>
										<p style="padding:6px 0;">
										<{if $tkey == 1 || $tkey == 3}><input type="radio" title="<{$letter[$key]}>" disabled <{if $result.is_right == 1}>checked<{/if}>/><{/if}>
										<{if $tkey == 2}><input type="checkbox" title="<{$letter[$key]}>" disabled <{if $result.is_right == 1}>checked<{/if}>/><{/if}>
											<{$result.answer_text}>
											
											<{if $result.is_right == 1}>
												<{$right_topics = $right_topics|cat:$letter[$key]|cat:"、"}>
											<{/if}>
										</p>
									<{/foreach}>
									<{if $topic_info.type == 8 || $topic_info.type == 9}>
									<p style="color:#000; padding:16px 0;"><span style="font-weight: bold;color:">你的答案：</span>
										<{$topic_info.user_answer.user_answers}>
									</p>
									<{else}>
									<p style="color:green; padding:16px 0;"><span style="font-weight: bold;">正确答案：</span><{$right_topics|mb_substr:0:-1}></p>
									<p style="color:#000; padding:16px 0;"><span style="font-weight: bold;color:">你的答案：</span>
										<{assign var="daan" value="0"}>
										<{foreach from=$topic_info.result item=result key=key}>
										<{if $result.id|in_array:$topic_info.user_answer}>
											<{assign var="user_right_topics" value=""}>
											<{$user_right_topics = $user_right_topics|cat:$letter[$key]|cat:"、"}>
											<{$user_right_topics|mb_substr:0:-1}>
											<{assign var="daan" value=$daan+1}>
										<{/if}>
										<{/foreach}>
										<{if $daan == 0}>
										未作答
										<{/if}>
									</p>
									<{/if}>
									<{else}>
										<{foreach from=$topic_info.result key=k item=item}>
											<{foreach from=$item key=k item=analys_item}>
											<div class="layui-tab-item layui-show">
												<div class="layui-form-item layui-form-text">
													<div class="layui-input-block">
														<{$k+1}>、<{$analys_item.subject_text}>
													</div>
												</div>
												
												<{if $analys_item.analys_type == 1}>
												<div class="layui-form-item tk_answer">
													<div class="layui-inline">
														<label class="layui-form-label">子题干答案</label>
														<div class="layui-input-block">
															<input type="text" name="analys[<{$analys_item.answer_list[0].aid}>][<{$analys_item.answer_list[0].id}>][answer_text]" value="<{$analys_item.answer_list[0].answer_text}>" disabled autocomplete="off" class="layui-input" style="width: 500px;">
														</div>
													</div>
												</div>
												<{else}>
												<{foreach from=$analys_item.answer_list key=k item=analys_result}>
												<div class="layui-form-item fl_answer">
													<div class="layui-inline">
														<label class="layui-form-label">借贷方向</label>
														<div class="layui-input-block">
															<select disabled name="analys[<{$analys_result.aid}>][<{$analys_result.id}>][type]">
																<option value="1" <{if $analys_result.type == 1}>selected<{/if}>>借</option>
																<option value="2" <{if $analys_result.type == 2}>selected<{/if}>>贷</option>
															</select>
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">选择科目</label>
														<div class="layui-input-block">
															<input type="hidden" class="accounts" name="analys[<{$analys_result.aid}>][<{$analys_result.id}>][topic_subject_id]" >
															<input type="text" autocomplete="off" style="width:200px;" class="layui-input" value="<{$analys_result.topic_subject_title}>" disabled onclick="choice_accounts(this)">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">答案</label>
														<div class="layui-input-block">
															<input type="text" style="width:145px;" name="analys[<{$analys_result.aid}>][<{$analys_result.id}>][answer_text]" value="<{$analys_result.answer_text}>" disabled autocomplete="off" class="layui-input">
														</div>
													</div>
												</div>
												<{/foreach}>
												<{/if}>

											</div>
										<{/foreach}>
									<{/foreach}>

									<fieldset class="layui-elem-field" style="background-color: #fafafa;color: #999;">
									<legend>你的答案</legend>
									<div class="layui-field-box">
									<{foreach from=$topic_info.result key=k item=item}>
										<{foreach from=$item key=k item=analys_item}>

											<div class="layui-tab-item layui-show">
												<div class="layui-form-item layui-form-text">
													<div class="layui-input-block">
														<{$k+1}>、<{$analys_item.subject_text}>
													</div>
												</div>
												
												<{if $analys_item.analys_type == 1}>
												<div class="layui-form-item tk_answer">
													<div class="layui-inline">
														<label class="layui-form-label">子题干答案</label>
														<div class="layui-input-block">
															<input type="text" name="" value="<{if !empty($analys_item.user_answer_list[$analys_item.answer_list[0].id])}><{$analys_item.user_answer_list[$analys_item.answer_list[0].id]['answer_text']}><{/if}>" disabled autocomplete="off" class="layui-input" style="width: 500px;">
														</div>
													</div>
												</div>
												<{else}>
												<{foreach from=$analys_item.answer_list key=k item=analys_result}>
												<div class="layui-form-item fl_answer">
													<div class="layui-inline">
														<label class="layui-form-label">借贷方向</label>
														<div class="layui-input-block">
															<select disabled name="">
																<option value="1" <{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id]) AND $analys_item.user_answer_list[$analys_item.answer_list[$k].id] == 1}>selected<{/if}>>借</option>
																<option value="2" <{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id]) AND $analys_item.user_answer_list[$analys_item.answer_list[$k].id] == 2}>selected<{/if}>>贷</option>
															</select>
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">选择科目</label>
														<div class="layui-input-block">
															<input type="hidden" class="accounts" name="" >
															<input type="text" autocomplete="off" style="width:200px;" class="layui-input" value="<{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id])}><{$analys_item.user_answer_list[$analys_item.answer_list[$k].id]['topic_subject_id']|get_topic_subject}><{/if}>" disabled onclick="choice_accounts(this)">
														</div>
													</div>
													<div class="layui-inline">
														<label class="layui-form-label">答案</label>
														<div class="layui-input-block">
															<input type="text" style="width:145px;" name="" value="<{if !empty($analys_item.user_answer_list[$analys_item.answer_list[$k].id])}><{$analys_item.user_answer_list[$analys_item.answer_list[$k].id]['answer_text']}><{/if}>" disabled autocomplete="off" class="layui-input">
														</div>
													</div>
												</div>
												<{/foreach}>
												<{/if}>

											</div>
										<{/foreach}>
									<{/foreach}>
									</div>
									</fieldset>
									
									<{/if}>
									<fieldset class="layui-elem-field" style="background-color: #fafafa;color: #999;">
										<legend>答题解析</legend>
										<div class="layui-field-box">
										<p style="font-weight: bold;"><{$topic_info.analysis}></p>
									  </div>
									</fieldset>
								</blockquote>
								<{/foreach}>
							<{/foreach}>
						</form>
						<!--star会员管理-->
					</div>
					<!--end tabMainCont-->
				</div>
			</div>
		</div>
	</div>
</div>
</body>
</html>
